<include file="Public:header" />
<style>
.IndexMenu a {
	background: #EBEBEB;
	padding: 20px 0;
	color: #000;
	text-align: center;
	display: block;
	margin-bottom: 10px;
}
.IndexMenu a i {
	font-size: 18px;
}
.IndexMenu a:hover {
	background: #000000;
	color: #fff;
    text-decoration:none;
}
</style>
<script src="__PUBLIC__/Js/highcharts.src.js"></script>
<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="row" style="margin:0; padding-top:20px;">
      <div class="col-sm-6">
        <div class="panel panel-info" style="display:none;">
          <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-rocket"></i> 快捷设置</h3>
          </div>
          <div class="panel-body">
            <div class="row IndexMenu">
            
            
            
            
             <if condition="getAccessMenu($accessList, 'Admin', 'Sitecheck', 'showsetup')">
              <div class="col-sm-3 col-lg-2 col-xs-4"> <a onClick="art.dialog.open('{:U('Sitecheck/showsetup')}', {width: 800, height: 700,lock:true,title:'系统设置向导'});" href="javascript:void(0);"><i class="fa fa-smile-o"></i> <br>
                设置向导</a></div>
            </if>
            
            <if condition="getAccessMenu($accessList, 'Admin', 'Sitecheck', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('Sitecheck/index')}" target="_blank"><i class="fa fa-check-square-o"></i> <br>
                设置检测</a></div>
            </if>
            
            
            
            <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'Conf')">
              <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('Site/Conf')}"><i class="fa fa-cogs"></i> <br>
                站点设置</a></div>
            </if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Affiliatesetting', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Affiliatesetting/index')}"><i class="fa fa-share-alt"></i><br>
                分销设置</a></div>
                </if>
                
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('/',array(),true,false,true,__SITEID__)}"><i class="fa fa-eye"></i><br>
                预览店铺</a></div>
                <if condition="getAccessMenu($accessList, 'Admin', MODULE_NAME, 'clearCache')">
                <div class="col-sm-3 col-lg-2 col-xs-4"><a class="clearCache" href="javascript:void(0);"><i class="fa fa-refresh"></i><br>
                清除缓存</a></div>
                </if>
                
                <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'Conf')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Site/Conf', array('field' => 'appsecret'))}"><i class="fa fa-weixin"></i><br>
                微信接口</a></div>
                </if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Payment', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Payment/index')}"><i class="fa fa-credit-card"></i><br>
                支付接口</a></div>
                </if>
              <if condition="getAccessMenu($accessList, 'Admin', 'User', 'index')">
                <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('User/index')}"><i class="fa fa-group"></i><br>
                  用户权限</a></div>
              </if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Member_bank', 'index')  and  $myLevel == 1">
                <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Member_bank/index')}"><i class="fa fa-group"></i><br>
                  银行信息</a></div>
              </if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Safe', 'index')  and  $myLevel == 1">
                <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Safe/index')}"><i class="fa fa-group"></i><br>
                  安全中心</a></div>
              </if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Member', 'index')  and  $myLevel == 1">
                <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Member/index')}"><i class="fa fa-group"></i><br>
                  会员管理</a></div>
              </if>
                
                
                
            </div>
          </div>
        </div>
        <div class="panel panel-info" style="display:none;">
          <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-shopping-cart"></i> 商城管理</h3>
          </div>
          <div class="panel-body">
            <div class="row IndexMenu">
              <if condition="getAccessMenu($accessList, 'Admin', 'delivery', 'index')  and  $myLevel == 1">
                <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('delivery/index')}"><i class="fa fa-file-text"></i> <br>
                  发货管理</a></div></if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Type', 'index')">
                <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Type/index')}"><i class="fa fa-cubes"></i><br>
                  产品类型</a></div> </if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Order', 'index')">
                <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('Order/index')}"><i class="fa fa-file-text"></i> <br>
                  订单管理</a></div></if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Product_category', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Product_category/index')}"><i class="fa fa-th-large"></i><br>
                商品分类</a></div> </if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Product', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Product/index')}"><i class="fa fa-gift"></i><br>
                产品管理</a></div> </if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Brand', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Brand/index')}"><i class="fa fa-bookmark"></i><br>
                品牌管理</a></div> </if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Shipping', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Shipping/index')}"><i class="fa fa-truck"></i><br>
                配送方式</a></div> </if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Invoice', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Invoice/index')}"><i class="fa fa-file-o"></i><br>
                发票类型</a></div></if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Supplier', 'index')">
                <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('Supplier/index')}"><i class="fa fa-file-text"></i> <br>
                  供货商管理</a></div></if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Returngoods', 'index')">
                <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('Returngoods/index')}"><i class="fa fa-file-text"></i> <br>
                  退换货管理</a></div></if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Productqr', 'index')">
                <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('Productqr/index')}"><i class="fa fa-file-text"></i> <br>
                  收款二维码</a></div></if>
              <if condition="getAccessMenu($accessList, 'Admin', 'Member_account_log', 'index') and  $myLevel == 1">
                <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('Member_account_log/index')}"><i class="fa fa-file-text"></i> <br>
                  会员资金明细</a></div></if>
            </div>
          </div>
        </div>
        <div class="panel panel-info" style="display:none;">
          <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-edit"></i> 文章系统</h3>
          </div>
          <div class="panel-body">
            <div class="row IndexMenu">
            <if condition="getAccessMenu($accessList, 'Admin', 'News', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"> <a href="{:U('News/index')}"><i class="fa fa-file-text"></i> <br>
                文章管理</a></div>
                </if><if condition="getAccessMenu($accessList, 'Admin', 'Category', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Category/index')}"><i class="fa fa-list-alt"></i><br>
                文章分类</a></div></if>
                <if condition="getAccessMenu($accessList, 'Admin', 'Collect', 'index')">
              <div class="col-sm-3 col-lg-2 col-xs-4"><a href="{:U('Collect/index')}"><i class="fa fa-scissors"></i><br>
                发布广告</a></div></if>
            </div>
          </div>
        </div>
      </div>
      <div class="col-sm-6">
      <if condition="$myLevel == 1">
        <div class="panel panel-info">
          <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-edit"></i> 收益数据</h3>
          </div>
          <div class="panel-body">
            <div class="row IndexMenu">
                <div class="col-sm-3 col-lg-2 col-xs-4"><if condition="$commission eq 0 ">0
                  <else />
                  {$commission}</if> <br>
                  总收益 </div>
              <div class="col-sm-3 col-lg-2 col-xs-4"><?php echo D('Member')->where('id = '.$myid)->getfield('money');?><br>
                账户余额 </div>
                <div class="col-sm-3 col-lg-2 col-xs-4">{$ysstercom|default=0}<br>
                  昨日收益 </div>
              <div class="col-sm-3 col-lg-2 col-xs-4">{$allTotal}<br>
                总收益 </div>
              <div class="col-sm-3 col-lg-2 col-xs-4">{$memberLevelOne}<br>
                平台商家数 </div>
              <div class="col-sm-3 col-lg-2 col-xs-4">{$yesterday}<br>
                平台昨日营业额 </div>
            </div>
          </div>
        </div>
      </if>

      <if condition="getAccessMenu($accessList, 'Admin', 'Order', 'index')">
<!--
        <div class="panel panel-info">
          <div class="panel-heading">
            <h3 class="panel-title">数据统计</h3>
          </div>
          <div class="panel-body">



           <div id="containero" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

           <script type="text/javascript">
$(function () {
    $('#containero').highcharts({
        chart: {
            type: 'spline'
        },
        title: {
            text: ''
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            type: 'datetime',
            labels: {
                overflow: 'justify'
            }
        },
        yAxis: {
            title: {
                text: '订单个数'
            },
            minorGridLineWidth: 0,
            gridLineWidth: 0,
            alternateGridColor: null,
            plotBands: []
        },
        tooltip: {
            valueSuffix: ' 个'
        },
      plotOptions: {
        spline: {
          lineWidth: 1,
          states: {
            hover: {
              lineWidth: 1
            }
          },
          marker: {
            enabled: false
          },
          pointInterval: 3600*24*1000, // 24 hour
          pointStart: Date.UTC({:date('Y',$stime)}, <if condition="date('m', $stime) eq 1">12<else/><?php echo date('m', $stime)-1;?></if>, {:date('d',$stime)}, 0, 0, 0)
}
},
        series: [
		<volist name="order" id="vo">
		{
            name: '{$vo.title}',
            data: [
			<volist name="vo['data']" id="dvo">
			{$dvo.tp},
			</volist>
			]
        },
		</volist>
		],
        navigation: {
            menuItemStyle: {
                fontSize: '2px'
            }
        }
    });
});

		</script>
          </div>
        </div>-->
        <if condition="$_SESSION[C('ADMIN_AUTH_KEY') ]">
          <!--<div class="panel panel-info">
            <div class="panel-heading">
              <h3 class="panel-title">平台信息</h3>
            </div>
            <div class="panel-body">
              <p style="font-size:24px;">站点数量：{$siteCount}</p>
              <p style="font-size:24px;">用户数量：{$userCount}</p>
            </div>
          </div>-->
        </if>
      </if>
    </div>
    </div>
  </div>
  <div class="clear"></div>
</div>
<!--主体结束-->
<script>
$('.IndexMenu').each(function(index, element) {
    if($(this).find('.col-sm-3.col-lg-2.col-xs-4').length>0){
		$(this).parent().parent().show();
	}
});
</script>
<div id="bottom"> </div>
</body></html>